import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import(/* webpackChunkName: "about" */ '../views/home/index.vue')
  },
  {
    path: '/post',
    name: 'post',
    component: () => import(/* webpackChunkName: "about" */ '../views/post/index.vue')
  },
  {
    path: '/shop',
    name: 'shop',
    component: () => import(/* webpackChunkName: "about" */ '../views/shop/index.vue')
  },
  {
    path: '/mime',
    name: 'mime',
    component: () => import(/* webpackChunkName: "about" */ '../views/mime/index.vue')
  },
  {
    path: '/admin',
    name: 'admin',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/home.vue')
  },
  {
    path: '/userInfo',
    name: 'userInfo',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/userInfo.vue')
  },
  {
    path: '/postInfo',
    name: 'postInfo',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/postInfo.vue')
  },
  {
    path: '/postType',
    name: 'postType',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/postType.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/login.vue')
  },
  {
    path: '/homeFamily',
    name: 'homeFamily',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/homeFamily.vue')
  },
  {
    path: '/shopGoods',
    name: 'shopGoods',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/shopGoods.vue')
  },
  {
    path: '/shopOrder',
    name: 'shopOrder',
    component: () => import(/* webpackChunkName: "about" */ '../views/admin/shopOrder.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
